<?php

namespace App\Entities;

class ConvertibleCardUseRecordEntity extends ABaseEntity
{
    public function __construct(ConvertibleCardUseRecordModel $model)
    {
        $this->model = $model;
    }

    /**
     * @return int
     */
    public function getId()
    {
        return (int)$this->model->id;
    }

    /**
     * 用户ID
     * @return int
     */
    public function getUserId()
    {
        return (int)$this->model->user_id;
    }

    /**
     * 用户ID
     * @param int $userId
     */
    public function setUserId(int $userId)
    {
        $this->model->user_id = $userId;
    }

    public function getType()
    {
        return $this->model->type;
    }

    public function setType($type)
    {
        $this->model->type = $type;
    }

    public function getValue()
    {
        return $this->model->value;
    }

    public function setValue($value)
    {
        $this->model->value = $value;
    }

    public function getCreatedAt()
    {
        return $this->model->created_at;
    }

    public function setCreatedAt($createdAt)
    {
        $this->model->created_at = $createdAt;
    }

    public function getConvertibleCardId()
    {
        return $this->model->convertible_card_id;
    }

    public function setConvertibleCardId($cardId)
    {
        $this->model->convertible_card_id = $cardId;
    }

    /**
     * @param int $orderId
     */
    public function setOrderId(int $orderId)
    {
        $this->model->order_id = $orderId;
    }

    /**
     * @return int
     */
    public function getOrderId()
    {
        return (int)$this->model->order_id;
    }

    /**
     * @param string $operator
     */
    public function setOperator(string $operator): void
    {
        $this->model->operator = $operator;
    }

    /**
     * @return string
     */
    public function getOperator(): string
    {
        return $this->model->operator;
    }

    /**
     * @param int $user_card_id
     */
    public function setUserCardId(int $user_card_id): void
    {
        $this->model->user_card_id = $user_card_id;
    }

    /**
     * @return int
     */
    public function getUserCardId(): int
    {
        return $this->model->user_card_id;
    }
}
